package com.lzh.gulimall.product.feign.fallback;

import com.lzh.common.exception.BizCodeEnum;
import com.lzh.common.utils.R;
import com.lzh.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @ClassName SeckillFeignServiceFallBack
 * @Description TODO
 * @Author liuzhihui
 * @Date 2020/9/12 0:09
 * @Version 1.0
 **/
@Slf4j
@Component
public class SeckillFeignServiceFallBack implements SeckillFeignService {
    @Override
    public R getSkuSeckilInfo(Long skuId) {
        log.info("熔断方法调用...");
        return R.error(BizCodeEnum.TOO_MANY_REQUEST.getCode(),BizCodeEnum.TOO_MANY_REQUEST.getMessage());
    }
}

